home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13999 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  39 lines

  1. Newsgroups: comp.lang.c
  2. Path: gail.ripco.com!mambuhl
  3. From: mambuhl@ripco.com (Martin Ambuhl)
  4. Subject: Re: can`t get system call
  5. Message-ID: <Dpotwv.6K7@rci.ripco.com>
  6. X-Nntp-Sender: mambuhl@cook.ripco.com
  7. Sender: usenet@rci.ripco.com (Net News Admin)
  8. Organization: Ripco Internet BBS Chicago
  9. Date: Thu, 11 Apr 1996 07:53:19 GMT
  10.  
  11. merv@snowone.demon.co.uk (snowone) in
  12. <828623397.22462@snowone.demon.co.uk> asks:
  13.  
  14. >can anyone help me. I have msvc version one and i'm trying to get
  15. >this program working
  16.  
  17. >#include <process.h>
  18.         why are you including this non-standard header?
  19.         system() is prototyped in stdlib.h
  20.  
  21. >void main()
  22.         why are you trying to confuse the poor compiler?
  23.         main returns an int.
  24.  
  25. >{
  26. >   system("dir");
  27. >}
  28.  
  29. >Will not compile. Says on linking _system is undeclared
  30. >(note at first would not compile until #undef _WINDOWS)
  31.  
  32.         Since _WINDOWS is not #defined here and should not
  33.         be defined in stdlib.h, this is a red herring.
  34.  
  35.                                                                                                                      
  36. --
  37. * Martin Ambuhl       net: mambuhl@ripco.com
  38. * Chicago, IL (USA)    
  39.